﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.IO;
using System.Drawing.Imaging;
using System.Data.SqlClient;
using System.Configuration;
using System.Data.Sql;
using System.Data.SqlTypes;
using System.Web.SessionState;
using System.ComponentModel;
using System.Data;
using System.Web.UI.HtmlControls;

namespace iResume
{
    public partial class Recruiteradmin : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ArrayList viewAdmin = new ArrayList();
            string email = (string)(Session["username"]);
            if (email == null)
            {
                Response.Redirect("loginpage.aspx");
            }
            viewAdmin = DBManager.retrievead(email);
            Admin Updatead = new Admin();
            Updatead = (Admin)viewAdmin[0];
            Image1.ImageUrl = "AdminImg.ashx?id=" + Updatead.Email;


            name.Text = Updatead.Fullname;
            //  tbxEmail.Text = adminUpdate.Email;
            dob.Text = Convert.ToString(Updatead.Dateofbirth.ToString());
            gender.Text = Updatead.Gender;
            Address.Text = Updatead.Address;
            post.Text = Updatead.Postalcode;
            nation.Text = Updatead.Nationality;
            cont.Text = Updatead.Contact;

        }

        protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Select")
            {
                // Convert the row index stored in the CommandArgument
                // property to an Integer.
                int index = Convert.ToInt32(e.CommandArgument);

                // Retrieve the row that contains the button clicked 
                // by the user from the Rows collection.
                GridViewRow row = GridView1.Rows[index];

                // Create a new ListItem object for the contact in the row.     
                ListItem item = new ListItem();


                Session["usernamee"] = row.Cells[3].Text;
                Response.Redirect("adminViewRecruiter.aspx");

            }
        }
    }
}